package com.example.demo.utils;

public class ReSet {
    public static R Ok(){
        R r = new R();
        r.setCode(1);
        r.setMsg("成功");
        r.setCount(200);

        return r;
    }
    public static R Ok(Object data){
        R r = new R();
        r.setCode(1);
        r.setMsg("成功");
        r.setData(data);
        r.setCount(200);
        return r;
    }
    public static R Err(){
        R r = new R();
        r.setCode(2);
        r.setMsg("失败");
        r.setCount(400);

        return r;
    }
    public static R Err(Object data){
        R r = new R();
        r.setCode(2);
        r.setMsg("失败");
        r.setData(data);
        r.setCount(200);

        return r;
    }
    public static R TokenErr(){
        R r = new R();
        r.setCode(3);
        r.setCount(500);
        r.setMsg("失败");
        return r;
    }
}

